﻿<controls:ChildWindow xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="caedisi.Views.NeighbourhoodDefinitionEdit"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           MinWidth="400"  
           Title="Neighbourhood Definition">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>               
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />               
            </Grid.ColumnDefinitions>
           
            <sdk:Label Grid.Row="0" Grid.Column="0"  Content="Name" HorizontalAlignment="Left"  VerticalAlignment="Top" Margin="0,0,25,0" />
            <TextBox  Grid.Row="1" Grid.Column="0"  HorizontalAlignment="Left" VerticalAlignment="Top" Width="200" Margin="0,0,25,0" Text="{Binding Path=CurrentEntity.Name, Mode=TwoWay, NotifyOnValidationError=True}"/>           
            <sdk:Label Grid.Row="0" Grid.Column="1"  Content="Description" HorizontalAlignment="Left"  VerticalAlignment="Top" Margin="0,0,25,0" />
            <TextBox  Grid.Row="1" Grid.Column="1"  AcceptsReturn="True"  HorizontalAlignment="Left" VerticalAlignment="Top" Width="200" Height="50" Margin="0,0,25,0" Text="{Binding Path=CurrentEntity.Description, Mode=TwoWay, NotifyOnValidationError=True}"/>

        </Grid>

        <Grid Grid.Row="1"  Margin="2,20,2,2" HorizontalAlignment="Center">
            
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            
            <StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Margin="10">
                <TextBlock Text="Top Left" HorizontalAlignment="Left"/>
                <CheckBox HorizontalAlignment="Right" IsChecked="{Binding Path=CurrentEntity.IsTopLeftON, Mode=TwoWay}"/>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" Margin="10">
                <TextBlock HorizontalAlignment="Center" Text="Top" />
                <CheckBox HorizontalAlignment="Center" IsChecked="{Binding Path=CurrentEntity.IsTopON, Mode=TwoWay}"/>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="2" HorizontalAlignment="Left" Margin="10">
                <TextBlock HorizontalAlignment="Left" Text="Top Right" />
                <CheckBox HorizontalAlignment="Left" IsChecked="{Binding Path=CurrentEntity.IsTopRightON, Mode=TwoWay}"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" Margin="10" Orientation="Horizontal">
                <TextBlock Text="Left" HorizontalAlignment="Left"/>
                <CheckBox HorizontalAlignment="Right" IsChecked="{Binding Path=CurrentEntity.IsLeftON, Mode=TwoWay}"/>
            </StackPanel>
            <StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" Margin="10">
                <Ellipse HorizontalAlignment="Center"  Width="20" Height="20" Fill="Black"   />
            </StackPanel>
            <StackPanel Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Margin="10" Orientation="Horizontal">               
                <CheckBox HorizontalAlignment="Left" IsChecked="{Binding Path=CurrentEntity.IsRightON, Mode=TwoWay}"/>
                <TextBlock HorizontalAlignment="Left" Text="Right" />
            </StackPanel>
            <StackPanel Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" Margin="10">                
                <CheckBox HorizontalAlignment="Right" IsChecked="{Binding Path=CurrentEntity.IsBottomLeftON, Mode=TwoWay}"/>
                <TextBlock HorizontalAlignment="Right" Text="Bottom Left" />
            </StackPanel>
            <StackPanel Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" Margin="10">               
                <CheckBox HorizontalAlignment="Center" IsChecked="{Binding Path=CurrentEntity.IsBottomON, Mode=TwoWay}"/>
                <TextBlock HorizontalAlignment="Center" Text="Bottom" />
            </StackPanel>
            <StackPanel Grid.Row="2" Grid.Column="2" HorizontalAlignment="Left" Margin="10">                
                <CheckBox HorizontalAlignment="Left" IsChecked="{Binding Path=CurrentEntity.IsBottomRightON, Mode=TwoWay}"/>
                <TextBlock HorizontalAlignment="Left" Text="Bottom Right" />
            </StackPanel>
            
        </Grid>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="2" />
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="2" />
    </Grid>
</controls:ChildWindow>